package com.foxzzz.two.pointers;

public class Solution344 {
    public void reverseString(char[] s) {
        if (s.length == 0) {
            return;
        }
        int low = 0;
        int high = s.length - 1;
        while (low < high) {
            char temp = s[low];
            s[low] = s[high];
            s[high] = temp;
            low++;
            high--;
        }
    }

    public static void main(String[] args) {
        new Solution344().reverseString("hello".toCharArray());
        new Solution344().reverseString("".toCharArray());
    }
}
